//
//  NSData+hash.h
//  helper
//
//  Created by huangyi on 12-10-29.
//  Copyright (c) 2012年 huangyi. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSData (hash)

-(NSData*)md2;
-(NSData*)md4;
-(NSData*)md5;
-(NSData*)sha1;
-(NSData*)sha224;
-(NSData*)sha256;
-(NSData*)sha384;
-(NSData*)sha512;

-(NSData*)sha1hmac:(NSString*)key;
-(NSData*)md5hmac:(NSString*)key;

@end

extern NSData* file_digest_md5(NSString* filePath);
